﻿<%@ Page Language="C#" %>

<%
    int id = Int16.Parse(Request["id"]);
    DTO.SanPhamDto sp = BUS.SanPhamBus.LaySanPhamTheoID(id);
    Response.Write("<?xml version='1.0' encoding='utf-8'?>");
    Response.Write("<product>");
    Response.Write("<id>" + sp.ID + "</id>");
    Response.Write("<idloai>" + sp.IDLoai + "</idloai>");
    Response.Write("<ten><![CDATA[" + sp.TenSanPham + "]]></ten>");
    Response.Write("<hinh><![CDATA[" + sp.Hinh + "]]></hinh>");
    Response.Write("<gia>" + sp.DonGia + "</gia>");
    Response.Write("<diem>" + sp.DiemBinhChon + "</diem>");
    Response.Write("<conlai>" + sp.SoLuongCon + "</conlai>");
    Response.Write("<daban>" + sp.SoLuongDaBan + "</daban>");
    Response.Write("<idkhuyenmai>" + sp.IDKhuyenMai + "</idkhuyenmai>");
    Response.Write("<idgiamgia>" + sp.IDGiamGia + "</idgiamgia>");
    Response.Write("<ngaynhap><![CDATA[" + sp.NgayNhap + "]]></ngaynhap>");
    Response.Write("<idnhasx>" + sp.IDNhaSanXuat + "</idnhasx>");
    Response.Write("</product>"); 
%>
